package com.api.common.alert;

/**
 * 告警类型常量
 */
public interface AlertTypeConstants {
    
    // ========== API相关 ==========
    String API_FAILURE = "API_FAILURE";
    String API_SLOW = "API_SLOW";
    String API_TIMEOUT = "API_TIMEOUT";
    String API_RATE_LIMIT = "API_RATE_LIMIT";
    
    // ========== 任务相关 ==========
    String TASK_FAILURE = "TASK_FAILURE";
    String TASK_TIMEOUT = "TASK_TIMEOUT";
    String TASK_SKIPPED = "TASK_SKIPPED";
    
    // ========== 线程池相关 ==========
    String THREADPOOL_SATURATED = "THREADPOOL_SATURATED";
    String THREADPOOL_QUEUE_FULL = "THREADPOOL_QUEUE_FULL";
    String THREADPOOL_REJECTED = "THREADPOOL_REJECTED";
    
    // ========== 数据库相关 ==========
    String DATABASE_CONNECTION_FAILURE = "DATABASE_CONNECTION_FAILURE";
    String DATABASE_SLOW_QUERY = "DATABASE_SLOW_QUERY";
    String DATABASE_DEADLOCK = "DATABASE_DEADLOCK";
    String DATABASE_POOL_EXHAUSTED = "DATABASE_POOL_EXHAUSTED";
    
    // ========== 缓存相关 ==========
    String CACHE_HIT_RATE_LOW = "CACHE_HIT_RATE_LOW";
    String CACHE_CONNECTION_FAILURE = "CACHE_CONNECTION_FAILURE";
    String CACHE_EVICTION_HIGH = "CACHE_EVICTION_HIGH";
    String CACHE_MEMORY_HIGH = "CACHE_MEMORY_HIGH";
    
    // ========== MQ相关 ==========
    String MQ_SEND_FAILURE = "MQ_SEND_FAILURE";
    String MQ_CONSUME_FAILURE = "MQ_CONSUME_FAILURE";
    String MQ_QUEUE_BACKLOG = "MQ_QUEUE_BACKLOG";
    String MQ_DEAD_LETTER = "MQ_DEAD_LETTER";
    
    // ========== ES相关 ==========
    String ES_CONNECTION_FAILURE = "ES_CONNECTION_FAILURE";
    String ES_QUERY_SLOW = "ES_QUERY_SLOW";
    String ES_INDEX_FAILURE = "ES_INDEX_FAILURE";
    String ES_SYNC_DELAY = "ES_SYNC_DELAY";
    
    // ========== 推荐系统相关 ==========
    String RECOMMEND_MODEL_REBUILD_FAILURE = "RECOMMEND_MODEL_REBUILD_FAILURE";
    String RECOMMEND_MODEL_SLOW = "RECOMMEND_MODEL_SLOW";
    String RECOMMEND_DATA_INSUFFICIENT = "RECOMMEND_DATA_INSUFFICIENT";
    String RECOMMEND_COLD_START = "RECOMMEND_COLD_START";
    
    // ========== 风控相关 ==========
    String RISK_MODEL_FAILURE = "RISK_MODEL_FAILURE";
    String RISK_HIGH_SCORE = "RISK_HIGH_SCORE";
    String RISK_BLOCK_RATE_HIGH = "RISK_BLOCK_RATE_HIGH";
    String RISK_FEATURE_EXTRACTION_FAILURE = "RISK_FEATURE_EXTRACTION_FAILURE";
    
    // ========== 网关相关 ==========
    String GATEWAY_ROUTE_FAILURE = "GATEWAY_ROUTE_FAILURE";
    String GATEWAY_CIRCUIT_BREAKER_OPEN = "GATEWAY_CIRCUIT_BREAKER_OPEN";
    String GATEWAY_UPSTREAM_UNAVAILABLE = "GATEWAY_UPSTREAM_UNAVAILABLE";
    
    // ========== 限流相关 ==========
    String RATE_LIMIT_TRIGGERED = "RATE_LIMIT_TRIGGERED";
    String RATE_LIMIT_BURST = "RATE_LIMIT_BURST";
    
    // ========== 数据同步相关 ==========
    String CANAL_SYNC_FAILURE = "CANAL_SYNC_FAILURE";
    String CANAL_CONNECTION_LOST = "CANAL_CONNECTION_LOST";
    String DATA_INCONSISTENCY = "DATA_INCONSISTENCY";
    
    // ========== 系统资源相关 ==========
    String MEMORY_HIGH = "MEMORY_HIGH";
    String CPU_HIGH = "CPU_HIGH";
    String DISK_SPACE_LOW = "DISK_SPACE_LOW";
    String FILE_DESCRIPTOR_HIGH = "FILE_DESCRIPTOR_HIGH";
    
    // ========== 业务相关 ==========
    String CLEANUP_FAILURE = "CLEANUP_FAILURE";
    String AGGREGATION_FAILURE = "AGGREGATION_FAILURE";
    String ARCHIVE_FAILURE = "ARCHIVE_FAILURE";
    String CONFIG_RELOAD_FAILURE = "CONFIG_RELOAD_FAILURE";
    
    // ========== 用户业务相关 ==========
    String USER_LOGIN_FAILURE = "USER_LOGIN_FAILURE";
    String USER_REGISTER_FAILURE = "USER_REGISTER_FAILURE";
    String USER_ACCOUNT_LOCKED = "USER_ACCOUNT_LOCKED";
    String USER_ABNORMAL_BEHAVIOR = "USER_ABNORMAL_BEHAVIOR";
    String USER_ACTIVE_DROP = "USER_ACTIVE_DROP";
    
    // ========== 接口调用业务相关 ==========
    String INTERFACE_QUOTA_EXHAUSTED = "INTERFACE_QUOTA_EXHAUSTED";
    String INTERFACE_OFFLINE = "INTERFACE_OFFLINE";
    String INTERFACE_PERMISSION_DENIED = "INTERFACE_PERMISSION_DENIED";
    String INTERFACE_CALL_SPIKE = "INTERFACE_CALL_SPIKE";
    String INTERFACE_ERROR_RATE_HIGH = "INTERFACE_ERROR_RATE_HIGH";
    
    // ========== 支付订单业务相关 ==========
    String PAYMENT_FAILURE = "PAYMENT_FAILURE";
    String PAYMENT_TIMEOUT = "PAYMENT_TIMEOUT";
    String ORDER_CREATION_FAILURE = "ORDER_CREATION_FAILURE";
    String ORDER_CANCEL_RATE_HIGH = "ORDER_CANCEL_RATE_HIGH";
    String REFUND_FAILURE = "REFUND_FAILURE";
    
    // ========== 数据验证业务相关 ==========
    String DATA_VALIDATION_FAILURE = "DATA_VALIDATION_FAILURE";
    String DATA_FORMAT_ERROR = "DATA_FORMAT_ERROR";
    String DATA_DUPLICATION = "DATA_DUPLICATION";
    String ILLEGAL_PARAMETER = "ILLEGAL_PARAMETER";
    
    // ========== 第三方服务相关 ==========
    String THIRD_PARTY_API_FAILURE = "THIRD_PARTY_API_FAILURE";
    String THIRD_PARTY_TIMEOUT = "THIRD_PARTY_TIMEOUT";
    String THIRD_PARTY_RATE_LIMITED = "THIRD_PARTY_RATE_LIMITED";
    String SMS_SEND_FAILURE = "SMS_SEND_FAILURE";
    String EMAIL_SEND_FAILURE = "EMAIL_SEND_FAILURE";
    
    // ========== 审计安全相关 ==========
    String SENSITIVE_OPERATION = "SENSITIVE_OPERATION";
    String UNAUTHORIZED_ACCESS = "UNAUTHORIZED_ACCESS";
    String SUSPICIOUS_IP = "SUSPICIOUS_IP";
    String DATA_EXPORT_LARGE = "DATA_EXPORT_LARGE";
    
    // ========== 业务指标异常 ==========
    String METRIC_ANOMALY = "METRIC_ANOMALY";
    String CONVERSION_RATE_DROP = "CONVERSION_RATE_DROP";
    String SUCCESS_RATE_DROP = "SUCCESS_RATE_DROP";
    String TRAFFIC_ANOMALY = "TRAFFIC_ANOMALY";
}